import React from 'react'
import { ProductCard,NavBar , } from 'react-vant';
import Hog from '../untils/Hog';
import {useLocation,useNavigate} from "react-router-dom"
type Props = {}

const Deils = (props: Props) => {
  const Location:any=useLocation()
  
  const Navigate=useNavigate()
 
  return (
    <div>
      <NavBar
      title="DEILS"
      leftText="返回"
      rightText="按钮"
      onClickLeft={() => Navigate(-1)}
     
    />
       <ProductCard
      num={Location.state.state}
      price={Location.state.price}
      desc={Location.state.info}
      title={Location.state.title}
      thumb={Location.state.img}
    />
    </div>
  )
}

export default Hog(Deils)